QuickOPC User's Guide and Reference
Error Model in Live Binding
Development Models > Live Binding Model > Live Binding Model for OPC Data (Classic and UA) > Live Binding Details > Error Model in Live Binding

There are several types of errors that can occur in relation to live binding, and they are treated differently.

  1. When you configure the live binding in the designer, there may be one or more binding errors, caused by improper configuration. When this happens, the designer displays a form that lists all the binding errors detected.

    You can press the “Details…” button to view the details of the binding errors listed on the form.

    The binding errors are caused by BindingException-s during the design, and are generally “benign”, meaning that you can continue your design work, but you’d better fix the errors, otherwise they can cause more serious errors during runtime.

    Examples of such binding errors are:           

    • A binding where the value target has no TargetComponent specified.
    • Member linking error: The specified target member does not exist.
    • Member linking error: Cannot determine the data type of the target member.

    In the runtime, binding errors are reported by the BindingExtender.BindingErrors event. Unless you hook your own handler to this event, they are silently ignored.

  2. When the binding extender is set online or offline, there can also be event linking errors. They are similar to binding errors in that they are caused by improper configuration – this time, an improper configuration of some of the event sources used to automatically trigger the operations.

    Unless you decide to handle them, event linking errors are silently ignored both during design-time and in runtime. For event sources defined on the binding extender, any event linking error is signaled by the BindingExtender.EventLinkingFailure event. For event sources defined on the binder component (PointBinder, usually), its binding groups or its bindings, any event linking error is signaled by the BinderBase.EventLinkingFailure event.

  3. When a target could not be updated with a new value, an update failure occurs. Unless you decide to handle them, update failures are silently ignored both during design-time and in runtime. Each failure is signaled by the PointBinder.UpdateFailure event. The event notification contains an Exception indicating the cause of the update failure, and a reference to the related binding. You can hook your event handler to this event if you need some action be performed in such case.

    There may be various reasons for update failures; the most common are target access errors. They happen when the live binding encounters a failure accessing your objects (binding targets). For example, setting or getting a property on your object may throw an exception, and such exception will be caught. Target access error is represented by an instance of TargetAccessException in an update failure.

Errors that originate in the binding source, such as OPC item or OPC property, are considered a completely separate issue. For example, the OPC server may be shut down, or the item ID might have changed name and is no longer accessible, or its value just has a bad “quality”. Such errors are treated as just another data to be transferred by the binding. There are arguments (see Arguments and Results) such as Exception or ErrorId that allow you to set up members on your objects that will receive error information in case of errors that originate in the binding source.

See Also